
#include "semantics_context.h"
#include "main_container.h"
#include "semantic_analyzer.h"
extern MainContainer * CompilerData;


SemanticsUsingDirective::SemanticsUsingDirective()
{

}

SemanticsUsingDirective::~SemanticsUsingDirective()
{

}

#ifdef DEBUG
void SemanticsUsingDirective::DebugXMLOutput(FILE * fo)
{
	fprintf(fo, "<semanticsUsingDirective names=\"");
	SemanticAnalyzer::DebugOutputNameFromTable(fo, this->Names, CompilerData->Units);

	fprintf(fo, "\" alias=\"");
	fprintf(fo, "%d", this->Alias);

	fprintf(fo, "</semanticsUsingDirective>\n");

}
#endif

void SemanticsUsingDirective::RecognizeDirective(SyntaxTreeNode * usingNode)
{
	// TODO semantika
}

SemanticsContext::SemanticsContext()
{

}


SemanticsContext::~SemanticsContext()
{

}

void SemanticsContext::GatherFromUsingDirectives(SyntaxTreeNode * usingDirectivesNode, int parentContext)
{
	// TODO semantika
}



#ifdef DEBUG
void SemanticsContext::DebugXMLOutput(FILE * fo)
{
	fprintf(fo, "<semanticsContext parentContext=\"");
	fprintf(fo, "%d", this->ParentContext);

	// make output of table Parameters
	fprintf(fo, "<usingDirectives>\n");
	for(int i = 0; i < this->UsingDirectives->GetCount(); i++)
	{
		SemanticsUsingDirective * data = this->UsingDirectives->GetData(i);
		data->DebugXMLOutput(fo);
	}
	fprintf(fo, "</usingDirectives>\n");

	fprintf(fo, "</semanticsContext>\n");

}
#endif
